Add Integration Test for Sweeper Fee-Bumping to Maximum Fee Rate#9733
Add Integration Test for Sweeper Fee-Bumping to Maximum Fee Rate#9733gitsofaryan wants to merge 2 commits intolightningnetwork:masterfrom
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Description
This PR adds
testBumpFeeUntilMaxReached, an integration test to validate the LND sweeper’s fee-bumping for wallet transactions. It ensures the sweeper escalates fees to the configured maximum (--sweeper.maxfeerate=100sat/vbyte), respects budgets, and handles errors like "max fee rate exceeded". The test supports optimizing sweeper fee functions (e.g., cubic delay, linear, cubic eager) per issue #8763.The test:
--sweeper.maxfeerate=100, funds it with 1 BTC.BumpFeeRPC until 100 sat/vbyte, with a 50,000 sat budget.Results: Successfully reaches 100 sat/vbyte in ~3 bumps (1 → 10 → 50 → 100 sat/vbyte), passes all assertions.
Link to Associated Issue: Issue #8763 (adjust if needed).
Steps to Test
Clone and Checkout:
Set Up:
makeare installed.go mod tidy.Run Test:
make clean && make itest icase=bump_fee_until_max_reachedVerify Output:
Test Edge Cases:
--sweeper.maxfeerate=50initest/lnd_fee_bump_max.go, rerun, verify 50 sat/vbyte limit.Budget: 1000, confirm budget error.Review Code:
itest/lnd_fee_bump_max.goanditest/list_on_test.go.Pull Request Checklist
Testing
kvdb/v1.4.15-37-g51add8a70-dirty).Code Style and Documentation
📝 See Contribution Guidelines for further guidance.